/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.gateway.core.http.info;

import com.google.common.collect.Maps;
import info.peigen.hotpot.component.gateway.core.http.enums.HttpProtocol;
import info.peigen.hotpot.component.gateway.core.http.enums.HttpType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.noear.solon.core.handle.MethodType;

import java.util.Map;

import static org.noear.solon.core.handle.MethodType.POST;

/**
 * <b>(DatagramInfo)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2019-05-28
 */
@SuperBuilder
@Getter
@Setter
@AllArgsConstructor
public class DatagramInfo {

    /** 数据报文 */
    private String datagram;

    /** 报文类型 */
    @Builder.Default
    private HttpProtocol protocol = HttpProtocol.HTTP_JSON;

    /** http类型 */
    @Builder.Default
    private HttpType httpType = HttpType.JSON;

    /** http方法类型 */
    @Builder.Default
    private MethodType methodType = POST;

    /** 扩展参数 */
    @Builder.Default
    private Map<String, Object> extend = Maps.newHashMap();

}